<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/pages/safeai/jsp/common/taglibs.jsp"%>
<html>
	<head>
		<title>编辑订单</title>
		<%@ include file="/pages/safeai/jsp/common/meta.jsp"%>
		<script type="text/javascript" src="${ctx}/script/order.js"></script>
		<link href="${ctx}/css/safeai/together.css" rel="stylesheet" type="text/css">
		<style type=text/css>
.delMouseOver {
	background: #d0e0ff;
	color: black;
	cursor: hand;
	font-family: verdana, arial, helvetica;
	font-size: 12px;
}

.scheduleButtonVisible {
	background: silver;
	border-bottom: gray 1px dashed;
	border-left: white 1px dashed;
	border-right: gray 1px dashed;
	border-top: white 1px dashed;
	color: black;
	cursor: hand;
	font-family: webdings;
	font-size: 12px;
}
</style>

	</head>
<style media="print">.Noprint { DISPLAY: none }</style>
	<body style="font-size:12px" onload="count('${orderall.department}','${xinxi}');">
		<%@ include file="/pages/safeai/jsp/common/taglibs.jsp"%>
		<form action="${ctx}/addBillManage.do?method=updateBill" method="post"
			name="orderForm" id="orderForm" >
			<table width="100%">
				<input type="hidden" name="orderindex.id" value="${orderall.id}" />
				<input type="hidden" name="orderindex.status"
					value="${orderall.status}" />
				<input type="hidden" name="wuliu" value="${wuliu}" />
			<input type="hidden" name="caiwu" value="${caiwu}" />
			<input type="hidden" name="dianzi" value="${dianzi}" />
			<input type="hidden" name="wuliu2" value="${wuliu2}" />
				<tr>
					<th colspan="4" height="25px">
						编辑订单
					</th>
				</tr>
				<tr>
					<td class="td_3">
						订单号：
					</td>
					<td class="td_04">
						${orderall.id} 
					</td>

					<td class="td_3">
					&nbsp;
					</td>
					<td class="td_04">
								&nbsp;
							</td>

				</tr>
						<tr>
					<td class="td_3">
						订单状态：
					</td>
					<td class="td_04">
						${aa} <input type="hidden" value="${aa}" name="billstatus">
					</td>

					<td class="td_3">
						下单时间：
					</td>
					<td class="td_04">
								${orderall.adddate}
							</td>

				</tr>
				<tr>
					<td class="td_3">
						收货人城市：
					</td>
					<td class="td_04">
						<input type="text" name="orderindex.city" id="city"
							value="${orderall.city}" />
					</td>

					<td class="td_3">
						编辑人：
					</td>
					<td class="td_04">
						<bean:write name="USERINFO" property="username" />
						<br>
					</td>

				</tr>
				<tr>
					<td class="td_3">
						用户留言：
					</td>
					<td class="td_04">
						<textarea name="orderindex.customerword" cols="30" rows="4">${orderall.customerword}</textarea>
					</td>
					<input type="hidden" name="orderindex.customerid" id="id" />
					<td class="td_3">
						订单人VIP卡号：
					</td>
					<input type="hidden" name="password2" id="pas2" value="rayi" />
					<td class="td_04">
						${orderall.vipcode}
					</td>
				</tr>
				<tr>
					<td class="td_3">
						订货人：
					</td>
					<td class="td_04">
						${orderall.customername}
					</td>

					<td class="td_3">
						收货人：
					</td>
					<td class="td_04">
						<input type="text" name="orderindex.consignee" id="n1"
							value="${orderall.consignee}" />
					</td>

				</tr>
				<tr>
					<td class="td_3">
						订货人地址：
					</td>
					<td class="td_04">
						${orderall.paddress}
					</td>

					<td class="td_3">
						收货人地址：
					</td>
					<td class="td_04">
						<input type="text" name="orderindex.address" id="a1"
							value="${orderall.address}" />
					</td>
				</tr>
				<tr>
					<td class="td_3">
						订货人邮编：
					</td>
					<td class="td_04">
						${orderall.pwpostcode}
					</td>
					<td class="td_3">
						收货人邮编：
					</td>
					<td class="td_04">
						<input type="text" name="orderindex.postcode" id="p1"
							value="${orderall.postcode}" onBlur="javaScript:jiao1(this)" maxlength="6"/>
							<span style="color: red"></span>
					</td>

				</tr>
				<tr>
					<td class="td_3">
						订货人电话：
					</td>
					<td class="td_04">
						${orderall.mobile}
					</td>
					<td class="td_3">
						联系电话：
					</td>
					<td class="td_04">
						<input type="text" name="orderindex.mobilephone" id="ph1"
							value="${orderall.mobilephone}" onBlur="javaScript:phone1(this)" />
						<span style="color: red"></span>
					</td>
				</tr>
				<tr>
					<td class="td_3">
						*付款方式：
					</td>
					<td class="td_04">
						${orderall.pname}
					</td>
					<td class="td_3">
						*配送方式：
					</td>
					<td class="td_04">
						${orderall.dname}
					</td>
				</tr>
				<tr>
					<td class="td_3">
						发票抬头：
					</td>
					<td class="td_04">
						<textarea name="orderindex.invoicecompany" cols="30" rows="2">${orderall.invoicecompany}</textarea>
					</td>
					<td class="td_3">
						发票内容：
					</td>
					<td class="td_04">
						<textarea name="orderindex.invoicecontent" cols="35" rows="4">${orderall.invoicecontent}</textarea>
					</td>
				</tr>
				
			</table>
			<br>
			商品信息
			<table id="PLList" rules=rows width="100%">
				<tbody>
					<tr>
						<th id=tdt class="td_01" height="25px">
							<FONT color=white><a href="javascript:delAll()">X</a> <INPUT
									name=deid type=hidden> <INPUT name=edit type=hidden>
							</FONT>
						</th>
						<th class="td_01">
							物品
							<FONT color=white> </FONT>
						</th>
						<th class="td_01">
							备注
							<FONT color=white> </FONT>
						</th>
						<th class="td_01">
							<INPUT name=price type=hidden>
							单价
						</th>
						<th class="td_01">
							<INPUT name=isNeedInvoice type=hidden>
							发票
						</th>
						<th class="td_01">
							<INPUT name=isNeedSpcial type=hidden>
							特价
						</th>
						<th class="td_01">
							<INPUT name=count type=hidden>
							数量
						</th>
						<th class="td_01">
							<INPUT name=cash type=hidden>
							金额
						</th>
					</tr>

					<logic:iterate id="product" name="productlist" indexId="cd">
					<logic:equal value="2" name="product" property="pdvstatus">
						<tr id=tdt ln="<%=cd.intValue() + 1%>">
							<td class=scheduleButtonVisible onclick='delIt()'
								onmouseout='mouseOut()' onmouseover='mouseOver()'
								ln="<%=cd.intValue() + 1%>">
								<INPUT name=deid<%=cd.intValue() + 1%> type=hidden value="${product.productid}"/>
								<INPUT name=billson<%=cd.intValue() + 1%> type=hidden value="${product.id}"/>
								<INPUT name=getScorn<%=cd.intValue() + 1%> type=hidden value="${product.canpoint}"/>
							</td>
							<td class="td_09">
								${product.name}
							</td>
							<td class="td_09">
								<input type=text name=comm<%=cd.intValue() + 1%>
									ln="<%=cd.intValue() + 1%>" value="${product.remark}" />
							</td>
							<td class="td_09">
								<logic:notEqual value="2" property="isspecialoffer"
									name="product">
									<logic:equal value="0" property="hasinvoice" name="product">
										<input type="text" size="10" maxlength="100" name="price<%=cd.intValue() + 1%>"
										 ln="<%=cd.intValue() + 1%>"
											class="tableData" value="${product.unitprice}"
											onBlur='reCash2("<%=cd.intValue() + 1%>")'>
									</logic:equal>
								</logic:notEqual>
								<logic:equal value="2" property="isspecialoffer" name="product">
									<input type=text size=10 maxlength=100 name=price
										<%=cd.intValue() + 1%> ln="<%=cd.intValue() + 1%>"
										class=tableData value="${product.pricetax}"
										onBlur='reCash2("<%=cd.intValue() + 1%>")'>
								</logic:equal>
								<logic:equal value="1" property="hasinvoice" name="product">
									<input type="text" size="10" maxlength="100" name="price
										<%=cd.intValue() + 1%>" ln="<%=cd.intValue() + 1%>"
										class="tableData" value="${product.pricetax}"
										onBlur='reCash2("<%=cd.intValue() + 1%>")'>
								</logic:equal>
							</td>
							<td class="td_09">
								<select onchange='reCash2("<%=cd.intValue() + 1%>")'
									name="hasinvoice">
									<logic:equal value="0" property="hasinvoice" name="product">
										<option value="1">
											是
										</option>
										<option value="0" selected="selected">
											否
										</option>
									</logic:equal>
									<logic:notEqual value="0" property="hasinvoice" name="product">
										<option value="1" selected="selected">
											是
										</option>
										<option value="0">
											否
										</option>
									</logic:notEqual>
								</select>
							</td>
							<td class="td_09">
								<logic:equal value="2" name="product" property="isspecialoffer">
						     <input type="hidden" value="2">是
							</logic:equal>
								<logic:notEqual value="2" property="isspecialoffer"
									name="product">
			                 <input type="hidden" value="3">否
							</logic:notEqual>
						</td>
						<td class="td_09">
							<input type=text size=10 maxlength=100 name=count<%=cd.intValue() + 1%> ln="<%=cd.intValue() + 1%>" class=tableData
							 onBlur='reCash2("<%=cd.intValue() + 1%>")'
								value="${product.number}">
						</td>
						<td class="td_09">
							&nbsp;
						</td>
					</tr>
					</logic:equal>
					
					<logic:notEqual value="2" name="product" property="pdvstatus">
						<tr id="tdt" ln="<%=cd.intValue() + 1%>">
							<td class=scheduleButtonVisible onclick='delIt()'
								onmouseout='mouseOut()' onmouseover='mouseOver()'
								ln="<%=cd.intValue() + 1%>">
								<INPUT name=deid<%=cd.intValue() + 1%> type=hidden value="${product.productid}"/>
								<INPUT name=billson<%=cd.intValue() + 1%> type=hidden value="${product.id}"/>
								<INPUT name=getScorn<%=cd.intValue() + 1%> type=hidden value="${product.canpoint}"/>
							</td>
							<td class="td_03">
								${product.name}
							</td>
							<td class="td_03">
								<input type=text name=comm<%=cd.intValue() + 1%>
									ln="<%=cd.intValue() + 1%>" value="${product.remark}" />
							</td>
							<td class="td_03">
								<logic:notEqual value="2" property="isspecialoffer"
									name="product">
									<logic:equal value="0" property="hasinvoice" name="product">
										<input type=text size=10 maxlength=100 name=price
											<%=cd.intValue() + 1%> ln="<%=cd.intValue() + 1%>"
											class=tableData value="${product.unitprice}"
											onBlur='reCash2("<%=cd.intValue() + 1%>")'>
									</logic:equal>
								</logic:notEqual>
								<logic:equal value="2" property="isspecialoffer" name="product">
									<input type=text size=10 maxlength=100 name=price
										<%=cd.intValue() + 1%> ln="<%=cd.intValue() + 1%>"
										class=tableData value="${product.pricetax}"
										onBlur='reCash2("<%=cd.intValue() + 1%>")'>
								</logic:equal>
								<logic:equal value="1" property="hasinvoice" name="product">
									<input type=text size=10 maxlength=100 name=price
										<%=cd.intValue() + 1%> ln="<%=cd.intValue() + 1%>"
										class=tableData value="${product.pricetax}"
										onBlur='reCash2("<%=cd.intValue() + 1%>")'>
								</logic:equal>
							</td>
							<td class="td_03">
								<select onchange='reCash2("<%=cd.intValue() + 1%>")'
									name="hasinvoice">
									<logic:equal value="0" property="hasinvoice" name="product">
										<option value="1">
											是
										</option>
										<option value="0" selected="selected">
											否
										</option>
									</logic:equal>
									<logic:notEqual value="0" property="hasinvoice" name="product">
										<option value="1" selected="selected">
											是
										</option>
										<option value="0">
											否
										</option>
									</logic:notEqual>
								</select>
							</td>
							<td class="td_03">
								<logic:equal value="2" name="product" property="isspecialoffer">
						     <input type="hidden" value="2">是
							</logic:equal>
								<logic:notEqual value="2" property="isspecialoffer"
									name="product">
			                 <input type="hidden" value="3">否
							</logic:notEqual>
						</td>
						<td class="td_03">
							<input type=text size=10 maxlength=100 name=count<%=cd.intValue() + 1%> ln="<%=cd.intValue() + 1%>" class=tableData
							 onBlur='reCash2("<%=cd.intValue() + 1%>")'
								value="${product.number}">
						</td>
						<td class="td_03">
							&nbsp;
						</td>
					</tr>
					</logic:notEqual>
				</logic:iterate>
			</TBODY>
		</table>
		<table  rules=rows width="100%" id="pont">
			<tr>
				<td class="td_04" align="right">
					支付积分：
					<input border="0" type="text" id="paypoint" name="orderindex.usepoint"
						value="${orderall.usepoint}" onChange="reCash3();">
				</td>
			</tr>
			<tr>
				<td align="right" class="td_04">
					支付滞留金：
					<input border="0" type="text" id="paycash" name="orderindex.usebalance" value="${orderall.usebalance}"
						onChange="reCash3();">
				</td>
			</tr>
			<tr>
				<td align="right" class="td_04">
					配送金额：
					<input border="0" type="text" id="delivercash" name="orderindex.needcarriage" value="${orderall.needcarriage}"
						onChange="reCash3();">
				</td>
			</tr>
			<tr>
				<td align="right" class="td_04">
					优惠券：
					<input border="0" type="text" id="youhuiquan" name="ecoupon.favourablemoney" value="${youmo.favourablemoney}"
						onChange="reCash3();">
				</td>
			</tr>
			<tr>
				<td align="right" class="td_04">
					合计金额：
					<input border="0" type="text" id = "allcash" name="ecoupon.favourablemoney" value="${orderall.needpay}"
						onChange="reCash3();">
				</td>
			</tr>
		</table>
		<input type="hidden" id="chuang" name="chuang">
		<input type="hidden" id="billyubei" name="billyubei">
		<input type="hidden" id="orderprice" name="orderindex.orderprice">
		<input type="hidden" name="orderindex.id" value="${orderall.id}">	
			<table width="100%">
				<tr>
				<td align="center" class="td_03">
				<select multiple="multiple" id="sb1" name="sb1" style="display:none"></select>
				<select multiple="multiple" id="sb2" name="sb2" style="display:none"></select>
					<input type="button" id="tiid" value="保存编辑信息" class="btn" style="border: 1 solid #000000" onclick="editbill();"/>
				</td>		
					<input type="hidden" name="orderindex.id" value="${orderall.id}" />
					<input type="hidden" name="orderindex.department" value="${orderall.department}" />
					<td nowrap class="td_03">
						<input type="button" value="日&nbsp;&nbsp;&nbsp;志" class="btn"
							style="border: 1 solid #000000"
							onclick="theBigPropper('addBillManage.do?method=selectLog&id=${orderall.id}',500,500)" />
					</td>

					<td nowrap class="td_03">
						<input type="button" value="客服部处理" class="btn"
							style="border: 1 solid #000000" id="kefugao"
							onclick="theBigPropper('addBillManage.do?method=wait&id=${orderall.id}&status=${orderall.status}&dianzi=${dianzi}&wuliu=${wuliu}&wuliu2=${wuliu2}&caiwu=${caiwu}',520,300)" />
					</td>
					<td nowrap class="td_03">
						<input type="button" value="物流部1处理" class="btn"
							style="border: 1 solid #000000" id = "wuliugao";
							onclick="theBigPropper('addBillManage.do?method=wuliuwait&id=${orderall.id}&status=${orderall.status}&dianzi=${dianzi}&wuliu=${wuliu}&wuliu2=${wuliu2}&caiwu=${caiwu}',520,400)" />
					</td>
					<td nowrap class="td_03">
						<input type="button" value="物流部2处理" class="btn"
							style="border: 1 solid #000000" id = "wuliu2gao";
							onclick="theBigPropper('addBillManage.do?method=wuliu2wait&id=${orderall.id}&status=${orderall.status}&dianzi=${dianzi}&wuliu=${wuliu}&wuliu2=${wuliu2}&caiwu=${caiwu}',520,400)" />
					</td>
					<td nowrap class="td_03">
						<input type="button" value="财务部处理" class="btn"
							style="border: 1 solid #000000" id="caiwugao"
							onclick="theBigPropper('addBillManage.do?method=caiwuwait&id=${orderall.id}&status=${orderall.status}&dianzi=${dianzi}&wuliu=${wuliu}&wuliu2=${wuliu2}&caiwu=${caiwu}',520,300)" />
					</td>
				</tr>
			</table>
		</form>
		<form action="${ctx}/customerManage.do?method=serachforProduct"
			method="post">
			<input type="hidden" name="qu" value="1">
			<table id="table2" width="100%">
				<tr>
					<td align="center">
						商品名称模糊查询：
						<input type="text" name="catalogs.pname">
						<input type="submit" value="搜索" class="btn"
							onclick="show('customerManage.do?method=serachforProduct');">
					</td>
				</tr>
			</table>
		</form>
    <iframe frameborder="0" height="0" width="0" id="wuqu" name="wuqu"></iframe>
	</body>

</html>